<template>
  <div>
    <span>配置域名：</span>
    <div>{{ domain }}</div>
    <span>配置Path：</span>
    <div>{{ path }}</div>
    <div>
      <el-button type="primary" @click="setCookie">设置cookie</el-button>
      <el-button type="primary" @click="getCookie">获取cookie</el-button>
      <span>{{ myCookie }}</span>
    </div>
  </div>
</template>

<script>
export default {
  name: 'CookieTest',
  data () {
    return {
      domain: process.env.VUE_APP_DOMAIN,
      path: process.env.VUE_APP_PATH,
      myCookie: ''
    }
  },
  mounted () {
  },
  methods: {
    setCookie () {
      this.$cookies.set('testCookie', 'cam')
    },
    getCookie () {
      this.myCookie = this.$cookies.get('testCookie')
    }
  }
}
</script>

<style scoped>

</style>
